package cn.bugstack.domain.strategy.service;

import cn.bugstack.domain.strategy.model.valobj.StrategyAwardStockKeyVO;

/**
 * @Title: IRaffleStock
 * @Author tong
 * @Package cn.bugstack.domain.strategy.service
 * @Date 2025/6/5 11:50
 * @description: 抽奖库存相关服务，获取库存消耗队列
 */
public interface IRaffleStock {
    /**
     * 获取奖品库存消耗队列
     *
     * @return 奖品库存Key信息
     * @throws InterruptedException 异常
     */
    StrategyAwardStockKeyVO takeQueueValue(Long strategyId, Long awardId) throws InterruptedException;

    /**
     * 、
     * 更新奖品库存消耗记录
     *
     * @param strategyId 策略id
     * @param awardId    奖品id
     */
    void updateStrategyAwardStock(Long strategyId, Long awardId);
}
